package server

import (
	"context"
	"zk507/common/proto/user"
	"zk507/service/internal/logic"
)

type ServerUser struct {
	user.UnimplementedUserServer
}

func (s ServerUser) UserLogin(ctx context.Context, in *user.UserLoginRequest) (*user.UserLoginResponse, error) {
	res, err := logic.UserLogin(in)
	if err != nil {
		return nil, err
	}
	return res, nil
}
func (s ServerUser) Sms(ctx context.Context, in *user.SmsRequest) (*user.SmsResponse, error) {
	res, err := logic.Sms(in)
	if err != nil {
		return nil, err
	}
	return res, nil
}
func (s ServerUser) InformationSynchronous(ctx context.Context, in *user.InformationSynchronousRequest) (*user.InformationSynchronousResponse, error) {
	res, err := logic.InformationSynchronous(in)
	if err != nil {
		return nil, err
	}
	return res, nil
}

func (s ServerUser) InformationList(ctx context.Context, in *user.InformationListRequest) (*user.InformationListResponse, error) {
	res, err := logic.InformationList(in)
	if err != nil {
		return nil, err
	}
	return res, nil
}
